package main

import "fmt"

func f1(x int) {
	x = 100
}

func f2(x *int) {
	*x = 100
}

func main() {
	var a int = 10
	var p *int = &a
	var p1 **int = &p
	fmt.Printf("%T %v %v %T %v\n", p, p, *p, p1, p1)
	fmt.Println("-----------------------------------------------")

	*p = 20
	fmt.Println(a)
	fmt.Println("-----------------------------------------------")

	f1(a)
	fmt.Println(a)
	f2(&a)
	fmt.Println(a)
	fmt.Println("-----------------------------------------------")
}
